import {IExecute} from './iexecute';
import {GenerateOption} from '../generateOption';
import {DepCheckExecute} from './depcheckExecute';

/**
 * 提供获取的可执行的入口
 */
export class ExecuteProivder implements IExecute {

    public opt:GenerateOption;
    private executes:IExecute;
    constructor(opt:GenerateOption){
        this.opt = opt;
        this.executes = new DepCheckExecute(this.opt.jquery);
    }

    execute(compName: string, methodName: string, $dom:JQuery, args:Array<any>) {
        return this.executes.execute(compName, methodName, $dom, args);
    }
}